package com.xxl.job.executor.service.jobhandler;

import com.xxl.job.core.handler.annotation.XxlJob;
import com.xxl.job.executor.dao.DataMapper;
import com.xxl.job.executor.entity.AllData;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class SeachAllTest {
    @Autowired
    private DataMapper dataMapper;
    List<AllData> allData;

    @XxlJob("searchAll")
    public void searchAll() {
        allData=dataMapper.selectAll();
        System.out.println(allData);
    }

    @XxlJob("searchAllCount")
    public void searchAllCount(){
        int count=dataMapper.selectAllCount();
        System.out.println(count);
    }

}
